

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="layout" content="mode" />
        <title>${Inter.printOut('Create Project',session.language)}</title>
    </head>
    <body>
        <div class="undernav">
            <span class="menuButton"><g:link class="list" action="list">${Inter.printOut('Project List',session.language)}</g:link></span>
            <!-- This is the help button. -->
            <%  def help = Help.findByNameAndLanguage("project_create", session.language)
            def helplink = createLink(action:'show', controller:'help', id: help.id )%>
            <a href="#" onClick="MyWindow=window.open('${helplink}','Help','width=350,height=450'); return false;">${Inter.printOut('Help',session.language)}</a>
            <!-- This is the end of the help button. -->
        </div>
     <!-- <g:btnMode mode="${session.mode}"  currentView="create" currentController="project"></g:btnMode> -->
        <div class="body">
            <h1>${Inter.printOut('Create Project',session.language)}</h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <g:hasErrors bean="${projectInstance}">
            <div class="errors">
                <g:renderErrors bean="${projectInstance}" as="list" />
            </div>
            </g:hasErrors>
            <g:form action="save" method="post" >
                <div class="dialog">
                    <table>
                        <tbody>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="activityId">${Inter.printOut('Activity Id',session.language)}:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:projectInstance,field:'activityId','errors')}">
                                    <input type="text" maxlength="20" id="activityId" name="activityId" title="${Inter.printOut('Activity Id Hover',session.language)}" value="${fieldValue(bean:projectInstance,field:'activityId')}"/>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="name">${Inter.printOut('name',session.language)}:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:projectInstance,field:'name','errors')}">
                                    <input type="text" maxlength="200" id="name" name="name" value="${fieldValue(bean:projectInstance,field:'name')}"/>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="description">${Inter.printOut('Description',session.language)}:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:projectInstance,field:'description','errors')}">
                                    <textarea rows="5" cols="40" name="description">${fieldValue(bean:projectInstance, field:'description')}</textarea>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="area">${Inter.printOut('Area',session.language)}:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:projectInstance,field:'area','errors')}">
                                  <% def access = session.access
                                  access.refresh() %>
                                    <g:select optionKey="id" from="${session.access.getList('area')}" name="area.id" value="${projectInstance?.area?.id}" ></g:select>
                                </td>
                            </tr> 
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="startDate">${Inter.printOut('Start Date',session.language)}:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:projectInstance,field:'startDate','errors')}">
                                    <g:datePicker name="startDate" value="${projectInstance?.startDate}" precision="day" ></g:datePicker>
                                </td>
                            </tr>
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="endDate">${Inter.printOut('End Date',session.language)}:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:projectInstance,field:'endDate','errors')}">
                                    <g:datePicker name="endDate" value="${projectInstance?.endDate}" precision="day" ></g:datePicker>
                                </td>
                            </tr> 
                        
                           
                        
                        </tbody>
                    </table>
                  <input type="hidden" id="mode" name="mode" value="${session.mode}"/>
                </div>
                <div class="buttons">
                    <span class="button"><input class="save" type="submit" value="${Inter.printOut('Create',session.language)}" /></span>
                </div>
            </g:form>
        </div>
    </body>
</html>
